#include<bits/stdc++.h> 

using namespace std;
int main()
{
	system("g++ problem2.cpp -o problem2 -lm -std=c++11");
	system("g++ problem2_dij.cpp -o problem2_dij -lm -std=c++11");
	
	fstream fin("result.csv"); 
	if(!fin)
	{
  	    
	}
	else
	{
		fin.close();
		system("del result.csv");
	}
	
	
	puts("Compile Successful");
	
	for(int i = 1;i <= 16;i++)
	{
		printf("testdata #%d\n",i);
		char temp[10] ;
		char opt1[100] = "problem2.exe ";
		sprintf(temp,"%d",i);
		strcat(opt1,temp);
		
		char opt2[100] = "problem2_dij.exe ";
		sprintf(temp,"%d",i);
		strcat(opt2,temp);
		
		puts("IDA*");
		system(opt1);
		puts("Dij");
		system(opt2);
	}
	return 0;
} 
